package com.atguigu.mock.utils;

import java.util.Random;

/**
 * @ClassName: RandomNum
 * @Description:
 * @Author: kele
 * @Date: 2021/3/16 15:04
 **/

/**
 * 产生在随机数：从fromNum到toNum之间的随机数
 */
public class RandomNum {

    public static int getRandInt(int fromNum,int toNum){
        return fromNum + new Random().nextInt(toNum-fromNum+1);
    }

}
